home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / science / sm32a.zip / SYMBMATH.H37 < prev    next >
Text File  |  1994-03-29  |  2KB  |  68 lines

  1.             4.5 Differentiation
  2.  
  3.     Differentiate an expression y with respest to x by  
  4.         d(y, x)
  5.         Differentiate a simple function f(x) with respest to x by
  6.                 f'(x)
  7.     Differentiate y in order ( order > 0 ) by
  8.         d(y, x, order)
  9.     Differentiate y when x = x0 by
  10.         diff(y, x = x0)
  11.     Differentiate y when x = x0 in order (order > 0) by
  12.         diff(y, x = x0, order)
  13.             
  14.     Example 4.5.1. 
  15.         Differentiate sin(x) and x^(x^x).
  16.  
  17. IN:  sin'(x)    # sin'(x) is the same as d(sin(x), x).
  18. OUT: cos(x)
  19. IN:  d(x^(x^x), x)
  20. OUT: x^(x^x) (x^(-1 + x) + x^x ln(x) (1 + ln(x)))
  21.  
  22. If you differentiate f(x) by f'(x), x must be a simple variable and f(x)
  23. must be unevaluated.
  24.         f'(x0) is the same as d(f(x0),x0), but different from
  25. diff(f(x), x=x0). f'(x0) first evaluates f(x0), then differentiates the
  26. result of f(x0). But diff(f(x), x=x0) first differentiates f(x), then
  27. replace x with x0. Note that sin'(x^6) gives cos(x^6) as sin'(x^6) is the
  28. same as d(sin(x^6), x^6). sin'(0) gives d(0,0) as sin(0) is evaluated to 0
  29. before differentiation, you should use diff(sin(x),x=0) which gives 1.
  30.  
  31.     Example 4.5.2. 
  32. Differentiate the expression f=sin(x^2+y^3)+cos(2*(x^2+y^3)) with respect 
  33. to x, and with respect to both x and y.
  34.  
  35. IN:  f:=sin(x^2+y^3)+cos(2*(x^2+y^3))
  36. IN:  d(f, x)
  37. OUT: 2 x cos(x^2 + y^3) - 4 x sin(2 (x^2 + y^3))
  38. IN:  d(d(f, x), y)           # mixed derivative with x and y.
  39. OUT: -6 x y^2 sin(x^2 + y^3) - 12 x y^2 cos(2 (x^2 + y^3))
  40.  
  41.                 4.5.1  One-sided derivatives
  42.     Differentiate y when x = x0-zero or 0+zero (the left- or right-
  43. sided derivative) by
  44.         diff(y, x = x0-zero)
  45.         diff(y, x = x0+zero)
  46.  
  47.         Example.
  48. IN:  diff(ln(x), x=0)
  49. OUT: discont                     # discontinulity at x=0
  50. IN:  diff(ln(x), x=0-zero)       # left-sided derivative at x=0-
  51. OUT: -inf                        
  52. IN:  diff(ln(x), x=0+zero)       # right-sied derivative at x=0+
  53. OUT: inf
  54.  
  55.                4.5.2  Defining f'(x)
  56.     Defining derivatives is similar to defining rules. You only need
  57. to define derivatives of a simple function, as SymbMath automately apply
  58. the chain rule to its complicated function.
  59.     Example 4.5.2.2.
  60. IN:  f'(x_) := sin(x)
  61. IN:  f'(x)
  62. OUT: sin(x)
  63. IN:  f'(x^6)            # the same as d(f(x^6), x^6)
  64. OUT: sin(x^6)
  65. IN:  d(f(x^6), x)
  66. OUT: 6 x^5 sin(x^6)
  67.  
  68.